package com.fy.module.qu.controller;

import com.fy.common.vo.ApiRest;
import com.fy.module.qu.dto.QuSaveDto;
import com.fy.module.qu.service.IQuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 问题题目 前端控制器
 * </p>
 *
 * @author 虚拟宇宙公司
 * @since 2023-03-21
 */
@RestController
@RequestMapping("/qu")
@CrossOrigin
@Api(description = "题目管理模块")
public class QuController {
    @Autowired
    private IQuService quService;

    @PostMapping("save")
    @ApiOperation("添加题目")
    ApiRest save(@RequestBody QuSaveDto quSaveDto) {
        ApiRest apiRest = quService.add(quSaveDto);
        return apiRest;
    }
}